import React, { useMemo } from 'react';
import { useState, useEffect } from 'react';

// 引入子组件
import Child from './Child';


const Father = () => {

    const [count, setCount] = useState(0);

    return (
        <div>
            <p onClick={() => setCount(count + 1)}>count:{count}</p>
            {/* 使用子组件 */}
            <Child count1={count}></Child>
        </div>
    );
}

export default Father;
